.class public Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;
.super Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;
.source "TracksSelectionAdapter.java"


# instance fields
.field private selectedTracks:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/app/Activity;Ljava/util/List;Landroid/os/Bundle;Landroid/widget/ListView;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/app/Activity;",
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;",
            ">;",
            "Landroid/os/Bundle;",
            "Landroid/widget/ListView;",
            ")V"
        }
    .end annotation

    .line 21
    invoke-direct {p0, p1, p2, p3, p4}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;-><init>(Landroid/app/Activity;Ljava/util/List;Landroid/os/Bundle;Landroid/widget/ListView;)V

    .line 22
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->selectedTracks:Ljava/util/ArrayList;

    return-void
.end method


# virtual methods
.method public getSelectedFields()Ljava/util/ArrayList;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation

    .line 26
    iget-object v0, p0, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->selectedTracks:Ljava/util/ArrayList;

    return-object v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 2

    .line 36
    invoke-super {p0, p1, p2}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;->generateView(ILandroid/view/View;)Landroid/view/View;

    move-result-object p2

    .line 38
    invoke-virtual {p0, p1}, Llt/noframe/gpsfarmguide/adapters/TracksAdapterWithMap;->getItem(I)Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    move-result-object p1

    if-eqz p1, :cond_1

    const p3, 0x7f090096

    .line 40
    invoke-virtual {p2, p3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p3

    check-cast p3, Landroid/widget/CheckBox;

    const/4 v0, 0x0

    .line 41
    invoke-virtual {p3, v0}, Landroid/widget/CheckBox;->setVisibility(I)V

    .line 42
    iget-object v1, p0, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->selectedTracks:Ljava/util/ArrayList;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getId()I

    move-result p1

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    invoke-virtual {v1, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    const/4 p1, 0x1

    .line 43
    invoke-virtual {p3, p1}, Landroid/widget/CheckBox;->setChecked(Z)V

    goto :goto_0

    .line 45
    :cond_0
    invoke-virtual {p3, v0}, Landroid/widget/CheckBox;->setChecked(Z)V

    :cond_1
    :goto_0
    return-object p2
.end method

.method public setSelectedFields(Ljava/util/ArrayList;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList<",
            "Ljava/lang/Integer;",
            ">;)V"
        }
    .end annotation

    if-eqz p1, :cond_0

    .line 31
    iput-object p1, p0, Llt/noframe/gpsfarmguide/adapters/TracksSelectionAdapter;->selectedTracks:Ljava/util/ArrayList;

    :cond_0
    return-void
.end method
